home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / comm1 / intsdkss.lha / include / clib / rpc_protos.h < prev    next >
C/C++ Source or Header  |  1996-04-09  |  7KB  |  227 lines

  1. #ifndef _CLIB_RPC_PROTOS
  2. #define _CLIB_RPC_PROTOS
  3.  
  4. #include <stdio.h>
  5. #include <rpc/auth.h>
  6. #include <rpc/clnt.h>
  7. #include <rpc/svc.h>
  8. #include <rpc/types.h>
  9. #include <rpc/xdr.h>
  10.  
  11. typedef bool_t (*resultproc_t)(caddr_t, struct sockaddr_in *);
  12.  
  13. /*Prototypes for functions defined in auth_none.c */
  14.  
  15. AUTH *authnone_create(void);
  16.  
  17. /*Prototypes for functions defined in auth_unix.c */
  18.  
  19. AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *);
  20. AUTH *authunix_create_default(void);
  21.  
  22. /*Prototypes for functions defined in authunix_prot.c */
  23.  
  24. int xdr_authunix_parms(XDR *, struct authunix_parms *);
  25.  
  26. /*Prototypes for functions defined in bindresvport.c */
  27.  
  28. int bindresvport(int, struct sockaddr_in *);
  29.  
  30. /*Prototypes for functions defined in clnt_generic.c */
  31.  
  32. CLIENT *clnt_create(char *, u_long, u_long, char *);
  33.  
  34. /*Prototypes for functions defined in clnt_perror.c */
  35.  
  36. char *clnt_sperror(CLIENT *, char *);
  37. void clnt_perror(CLIENT *, char *);
  38. char *clnt_sperrno(enum clnt_stat);
  39. void clnt_perrno(enum clnt_stat);
  40. char *clnt_spcreateerror(char *);
  41. void clnt_pcreateerror(char *);
  42.  
  43. /*Prototypes for functions defined in clnt_raw.c */
  44.  
  45. CLIENT *clntraw_create(u_long, u_long);
  46.  
  47. /*Prototypes for functions defined in clnt_simple.c */
  48.  
  49. int callrpc(char *, u_long, u_long, u_long, xdrproc_t, char *, xdrproc_t, char *);
  50.  
  51. /*Prototypes for functions defined in clnt_tcp.c */
  52.  
  53. CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *, u_int, u_int);
  54.  
  55. /*Prototypes for functions defined in clnt_udp.c */
  56.  
  57. CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long, struct timeval, int *, u_int, u_int);
  58. CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long, struct timeval, int *);
  59.  
  60. /*Prototypes for functions defined in get_myaddress.c */
  61.  
  62. void get_myaddress(struct sockaddr_in *);
  63.  
  64. /*Prototypes for functions defined in getrpcent.c */
  65.  
  66. struct rpcent *getrpcbynumber(int);
  67. struct rpcent *getrpcbyname(char *);
  68. void setrpcent(int);
  69. void endrpcent(void);
  70. struct rpcent *getrpcent(void);
  71.  
  72. /*Prototypes for functions defined in getrpcport.c */
  73.  
  74. int getrpcport(char *, u_long, u_long, u_long);
  75.  
  76. /*Prototypes for functions defined in gettimeofday.c */
  77.  
  78. int gettimeofday(struct timeval *, struct timezone *);
  79.  
  80. /*Prototypes for functions defined in pmap_clnt.c */
  81.  
  82. int pmap_set(u_long, u_long, int, u_int);
  83. int pmap_unset(u_long, u_long);
  84.  
  85. /*Prototypes for functions defined in pmap_getmaps.c */
  86.  
  87. struct pmaplist *pmap_getmaps(struct sockaddr_in *);
  88.  
  89. /*Prototypes for functions defined in pmap_getport.c */
  90.  
  91. u_short pmap_getport(struct sockaddr_in *, u_long, u_long, u_int);
  92.  
  93. /*Prototypes for functions defined in pmap_prot.c */
  94.  
  95. int xdr_pmap(XDR *, struct pmap *);
  96.  
  97. /*Prototypes for functions defined in pmap_prot2.c */
  98.  
  99. int xdr_pmaplist(XDR *, struct pmaplist **);
  100.  
  101. /*Prototypes for functions defined in pmap_rmt.c */
  102.  
  103. enum clnt_stat pmap_rmtcall(struct sockaddr_in *, u_long, u_long, u_long, xdrproc_t, caddr_t, xdrproc_t, caddr_t, struct timeval, u_long *);
  104. int xdr_rmtcall_args(XDR *, struct rmtcallargs *);
  105. int xdr_rmtcallres(XDR *, struct rmtcallres *);
  106. enum clnt_stat clnt_broadcast(u_long, u_long, u_long, xdrproc_t, caddr_t, xdrproc_t, caddr_t, resultproc_t);
  107.  
  108. /*Prototypes for functions defined in requester.c */
  109.  
  110. BOOL requester(UBYTE *, UBYTE *, char *, ...);
  111.  
  112. /*Prototypes for functions defined in rpc_callmsg.c */
  113.  
  114. int xdr_callmsg(XDR *, struct rpc_msg *);
  115.  
  116. /*Prototypes for functions defined in rpc_prot.c */
  117.  
  118. int xdr_opaque_auth(XDR *, struct opaque_auth *);
  119. int xdr_accepted_reply(XDR *, struct accepted_reply *);
  120. int xdr_rejected_reply(XDR *, struct rejected_reply *);
  121. int xdr_replymsg(XDR *, struct rpc_msg *);
  122. int xdr_callhdr(XDR *, struct rpc_msg *);
  123. void _seterr_reply(struct rpc_msg *, struct rpc_err *);
  124.  
  125. /*Prototypes for functions defined in svc.c */
  126.  
  127. void xprt_register(SVCXPRT *);
  128. void xprt_unregister(SVCXPRT *);
  129. int svc_register(SVCXPRT *, u_long, u_long, void (*)(), int);
  130. void svc_unregister(u_long, u_long);
  131. int svc_sendreply(SVCXPRT *, xdrproc_t, caddr_t);
  132. void svcerr_noproc(SVCXPRT *);
  133. void svcerr_decode(SVCXPRT *);
  134. void svcerr_systemerr(SVCXPRT *);
  135. void svcerr_auth(SVCXPRT *, enum auth_stat);
  136. void svcerr_weakauth(SVCXPRT *);
  137. void svcerr_noprog(SVCXPRT *);
  138. void svcerr_progvers(SVCXPRT *, u_long, u_long);
  139. void svc_getreq(int);
  140. void svc_getreqset(fd_set *readfds);
  141.  
  142. /*Prototypes for functions defined in svc_auth.c */
  143.  
  144. enum auth_stat _authenticate(struct svc_req *, struct rpc_msg *);
  145. enum auth_stat _svcauth_null(struct svc_req *, struct rpc_msg *);
  146.  
  147. /*Prototypes for functions defined in svc_auth_unix.c */
  148.  
  149. enum auth_stat _svcauth_unix(struct svc_req *, struct rpc_msg *);
  150. enum auth_stat _svcauth_short(struct svc_req *, struct rpc_msg *);
  151.  
  152. /*Prototypes for functions defined in svc_raw.c */
  153.  
  154. SVCXPRT *svcraw_create(void);
  155.  
  156. /*Prototypes for functions defined in svc_run.c */
  157.  
  158. void svc_run(void);
  159.  
  160. /*Prototypes for functions defined in svc_simple.c */
  161.  
  162. int registerrpc(u_long, u_long, u_long, char *(*)(char *), xdrproc_t, xdrproc_t);
  163.  
  164. /*Prototypes for functions defined in svc_tcp.c */
  165.  
  166. SVCXPRT *svctcp_create(int, u_int, u_int);
  167. SVCXPRT *svcfd_create(int, u_int, u_int);
  168.  
  169. /*Prototypes for functions defined in svc_udp.c */
  170.  
  171. SVCXPRT *svcudp_bufcreate(int, u_int, u_int);
  172. SVCXPRT *svcudp_create(int);
  173. int svcudp_enablecache(SVCXPRT *, u_long);
  174.  
  175. /*Prototypes for functions defined in xdr.c */
  176.  
  177. void xdr_free(xdrproc_t, char *);
  178. int xdr_void(XDR *, void *);
  179. int xdr_int(XDR *, int *);
  180. int xdr_u_int(XDR *, u_int *);
  181. int xdr_long(XDR *, long *);
  182. int xdr_u_long(XDR *, u_long *);
  183. int xdr_short(XDR *, short *);
  184. int xdr_u_short(XDR *, u_short *);
  185. int xdr_char(XDR *, char *);
  186. int xdr_u_char(XDR *, u_char *);
  187. int xdr_bool(XDR *, int *);
  188. int xdr_enum(XDR *, int *);
  189. int xdr_opaque(XDR *, caddr_t, u_int);
  190. int xdr_bytes(XDR *, char **, u_int *, u_int);
  191. int xdr_netobj(XDR *, struct netobj *);
  192. int xdr_union(XDR *, int *, char *, struct xdr_discrim *, xdrproc_t);
  193. int xdr_string(XDR *, char **, u_int);
  194. int xdr_wrapstring(XDR *, char **);
  195.  
  196. /*Prototypes for functions defined in xdr_array.c */
  197.  
  198. int xdr_array(XDR *, caddr_t *, u_int *, u_int, u_int, xdrproc_t);
  199. int xdr_vector(XDR *, char *, u_int, u_int, xdrproc_t);
  200.  
  201. /*Prototypes for functions defined in xdr_float.c */
  202.  
  203. int xdr_float(XDR *, float *);
  204. int xdr_double(XDR *, double *);
  205.  
  206. /*Prototypes for functions defined in xdr_mem.c */
  207.  
  208. void xdrmem_create(XDR *, caddr_t, u_int, enum xdr_op);
  209.  
  210. /*Prototypes for functions defined in xdr_rec.c */
  211.  
  212. void xdrrec_create(XDR *, u_int, u_int, caddr_t, int (*)(void *, caddr_t, int),
  213.            int (*)(void *, caddr_t, int));
  214. int xdrrec_skiprecord(XDR *);
  215. int xdrrec_eof(XDR *);
  216. int xdrrec_endofrecord(XDR *, int);
  217.  
  218. /*Prototypes for functions defined in xdr_reference.c */
  219.  
  220. int xdr_reference(XDR *, caddr_t *, u_int, xdrproc_t);
  221. int xdr_pointer(XDR *, char **, u_int, xdrproc_t);
  222.  
  223. /*Prototypes for functions defined in xdr_stdio.c */
  224.  
  225. void xdrstdio_create(XDR *, FILE *, enum xdr_op);
  226. #endif
  227.